#ifndef __ADU_GAMEMANAGER_H__
#define __ADU_GAMEMANAGER_H__

#include "cocos2d.h"
#include "ADUConstant.h"
#include "ADUGamePlayScene.h"
#include "ADUContactFilter.h"
//#include "ADUContactListener.h"
#include "ADUSplash.h"
#include "ADUGameOverScene.h"
#include "ADUWater.h"


#include <Box2D/Box2D.h>
USING_NS_CC;
class GameManager {
private:
	static GameManager* m_instance;
	GameManager();
    float mWaterHeight;
    Vec2 mOffSet;
	
public:
	b2World*			mWorld;
    Water*              mWater;
	MyContactFilter		mContactFilter;
	// MyContactListener	mContactListener;
	void Step(float time);
	static GameManager* getInstance();
	~GameManager();
	void ResetWorld();
	void RunScene(int Scene);
	int prevBasinID;
	int gameScore;
	float scaleFactor;
	float ptmRatio;
    int gameLevel;

    float getWaterHeight();
    void setWaterHeight(float height);
    
    bool collisionCache[MAX_PARTICLE];

	Sprite* GetSprite(const char *file_name);
	void destroyAllBody();
    
    void SetColisionCache(int index, bool collisioned);
    bool GetColisionCache(int index);
    
    void SetOffset(Vec2 offset){
        mOffSet = offset;
    }

};



#endif

